package com.foreknow.elmboot.service.impl;

import com.foreknow.elmboot.mapper.BusinessMapper;
import com.foreknow.elmboot.po.Business;
import com.foreknow.elmboot.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by foreknow on 2022/5/7.
 * @Service注解：要告诉Spring容器当前为Service层， 以便后期来处理事务
 */
@Service
public class BusinessServiceImpl implements BusinessService {

    @Autowired
    private BusinessMapper businessMapper;


  @Override
  public List<Business> listBusinessByOrderTypeId(Integer orderTypeId) {
    return businessMapper.listBusinessByOrderTypeId(orderTypeId);
  }

  @Override
  public Business getBusinessById(Integer businessId) {
    return businessMapper.getBusinessById(businessId);
  }
}
